Theme fixes

this is a rebuild of the former PR, please ignore some commit messages.  It's not a good day for me    :P