fix various bugs and pushed to heroku