Error checker implemented for all tokens

Still needs a lot of bugfixing