Tidy up the parsing stuff.