Added Syntax error handling, fixed getInstruction method