Major changes to parser