various sundry fixes

Mostly css and genericization of js