added if functionality, vars are indented

Variables are no longer available outside block of their declaration. If statements have now less than and greater than.