implementing the themes feature and fixed some error on the templates