Move graphing related JS from app.js to graph.js