moved some js to relevant page only