Refactored themes.js