Configure for Heroku
Fix bugs in value calculation