Adding more support, cleaned up main code in app.js