Minor bug fixes (and parser fix) and tweaks