Added some more test cases. Fixed error reporting on wrong variable call.
  #186