Renaming/tidying up/improving parser. Next: database interface