Refined some more problems with the type checker. Types are now set correctly for declarations and id's.
Added a pass counter to be passed to every function in the semantics parser.