Cleaning up and refactoring theme