Improved parser and interpreter