Javascript stuff to make things prettier