Tidy up the data browser javascript