Added code for logical operators, fixed a few syntax errors