Cleaned up some code for themes initialization