Combine pudding mix, flour and baking powder;mix well. Melt butter. Remove from heat and add sugar. Beat in eggs, one at a time. Blend in vanilla, pudding and oil. Stir in nuts, if desired. Spread in a greased 8" pan. Bake at 350 degrees for 25 to 30 minutes. Cool in pan and cut into squares.