flog to just show the top problems
refactoring a bit
fixing tests
adding pg config for heroku