Types are now given as parameters. Fixes few bugs in parsing/type-/atomicchecking.