Parser rewrite
Few more fixes and changes