family: coding style:added Item for pair selection
The variables and functions required for handling and checking of the
pairs are placed in a single Item component so that it is easier to
both in terms of readability and simplicity. Also, all changing of
states for a node is now carried out via the changeState(state_)
function. Made few other indentation changes
Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>