make compatible with heroku and fix bugs
Merge pull request #19 from fox-squirrels-2013/heroku1

make compatible with heroku and fix bugs