Improved structure of parser.py and factored out utility functions with clean entry and exit points
Added normalisation functions which can be run to cleanup the database