Prettify slightly and separate hub javascript.