Cleaned up JS a little more