style. moved some js around
small changes