Fixed some bugs and did some tidying up.

- Redefined instance Ord VarType: <= is required for a complete
  definition. Previously only < was given.
- Added some necessary base cases for atomsMatchWith and
  stringsMatchWith to handle situations where the end of one list
  is reached before the other.