Moved inline javascript to Main.js