Tidied up the type checker, fixed some bugs in there, separated error and event logs, added some tests (not done yet), form does now store its name