Clean up parser code