Parser and other bugfixes