From Nacin:

> handle_theme_switch() method could be much cleaner