proper theme management, fixed up some stuff