Moved all embedded javascript source to application.js