Cleaned up a handful of Javascript