Moving inline javascript into the js file and making needed js variables objects