Correcting Javascript formatting