Added auto and manual switching of themes