Moving more js to actual js files