Added resolve method which determines the appropriate theme