Code optimization

- Fixed bug at Theme-Changing
- Some other code optimizations