changed names around a bit, added some logic to parser.c