Alot of fixes (mostly for token parser)