Updated theme logic -I part I