code cleanups, implement window_type_utility and wm_state_above