Tidy and update of theme functions

Preceding incoming update to theme layout files and css