Moved parser functions to parser.c