added pg for heroku
refactored controls template, etc