Avoided use of temporary variables.
Corrected bug in last commit.