add code for heroku and did some clean up