Lots and lots of refactoring of the theme system to make the themes work
properly.

Change-Id: Ib53e4b910d53733eb614c51ca3a1821f484cc246
Merge "Lots and lots of refactoring of the theme system to make the themes work properly."