theme support, lots of fixes.

my code is probably poorly organized.