Combine all dry ingredients in a bowl and whisk until fully combined.
Add oil to the flour mixture while whisking.
Mix in the eggs 1 at a time.
Fold in the carrots (and nuts if you want) gently.
Pour the mixture into the prepared pan, and bake for 50 to 60 minutes, or until a toothpick can be inserted and come out clean or with some cooked crumbs stuck to it.
Remove from pan to cool completely before applying frosting.
Cream Cheese Frosting
Beat the butter until it is softer than the cream cheese.
Make sure the cream cheese is room temperature, then beat it with the butter until combined. If it is not room temperature, the butter will clump up and not combine properly.
Mix in the sugar in batches, starting small (so as not to have a mushroom cloud of confectioners sugar).
Once it is fully incorporated, make sure the cake is fully cooled before spreading it on.
Notes
If you shred too many carrots, you can freeze them for later use.