Remove unused variables, move styles and use sensible class names

Fix issues such as unused variables and meaningless class names before
merge. Move and rename some styles to global styles module (see prq there)
and update local html files accordingly.