Added boolean temp vardecs to start of function
Rewrote one if expression
Removed printing of curly brackets of whileloops and if statements