Cleaning up sloppy JS style