Cleaned up code, separated js into app.js