Melt chocolate and butter together over low heat on stovetop or microwave just until butter is melted then stir until chocolate is completely
Stir in sugar, beaten eggs and vanilla and mix well.
Stir in flour, baking powder, salt and walnuts (if using).
Transfer batter into a lightly greased square baking dish. Bake in preheated oven at 350F for approximately 30 minutes.
Let cool for 10 minutes, slice and serve.