Improved parser code
Merge branch 'parser'