First very rough pass at theme compat

This is pretty much broken at the moment. Do not use.

See #283
Tests cleanup