rework and bug fixes for xp and darkui switch