Implemented feature for consolidating selected states.