Nicer Javascript

The javascript is a bit nicer now