Moved all script codes to my.js