Tidy and refactored some routines in the heroku log parser.