Fixed Javascript bugs caused by application.js in ajax call, application.js must now be include by host app