Tidy up AltParser code a bit