Replace hardcoded style with css, and also some hard-coded javascript with js
Move some embedded JS into real JS files