Added thread directive with support for the minimize, close and highlight UI states.