bug fixes and refactoring for if statements
added break statements
fixed bug with temp variable counts
added relational expressions