Have 1/2 cup butter at room temperature. Sift together flour, baking powder, and 1/3 cup sugar. Cut the 1/2 cup butter into dry ingredients with a pastry blender until mixture resembles cornmeal. Beat one egg and stir into flour mixture. Pat into a 9" flan pan, pushing about 1/3 of the dough up against sides of pan. Chill 1/2 hour. Soften remaining 1/2 cup of butter and beat remaining sugar into it. Beat in two eggs, one at a time, beating well between each. Stir in almonds and extract. Pour over pastry. Bake at 350 degrees for 30 minutes. Remove from oven and cool one hour. Spread jam over torte. Mix powdered sugar with enough lemon juice to form a spreadable icing. Use a pastry bag fitted with small hole to pipe icing in a design over top of torte.