fixed a bunch of parsing issues, in preparation for the port to YAML