Fixed up temporary space allocation for expressions. Added missing validation in return expressions.