Testing whether js is breaking page.. and condensing code