Bit of tidying

Including enumerator trickery, better parsing error, split files
and removal of overly-complex struct business.
Travis config