move inline js to main