modularizing a bit

Modularizing my vanity page code a bit to have a special js file and
not have it all on the html page.