Improved theme management