Preheat oven to 350°F. Grease a 9x13 inch baking pan and set aside.
In a large bowl, whisk together 3 cups flour, 1 cup sugar, 4 teaspoons baking powder, and 1/4 teaspoon salt until well combined.
In separate bowl, beat 1 1/2 cups milk, 2 eggs, and 2 teaspoons vanilla. Pour into dry ingredients and stir until just combined.
Gently fold in 1/2 cup melted butter. Pour batter into prepared pan and spread evenly.
For filling, beat 1 cup softened butter until creamy. Add 1 cup brown sugar, 2 tablespoons flour, and 1 tablespoon cinnamon. Mix until smooth and fluffy. Fold in nuts if using.
Drop spoonfuls of cinnamon filling over batter. Use knife to swirl through batter, creating ribbons. Don't overmix.
Bake for 35-40 minutes until toothpick inserted in center comes out clean. Top should be golden brown.
Cool for 15 minutes. Whisk together 2 cups powdered sugar, 5 tablespoons milk, 1 teaspoon vanilla, and cream cheese if using. Drizzle over warm cake.
Serve warm or at room temperature. Store in airtight container at room temperature up to 3 days.