Moved selector parsing code to the *Items class. Moved item matching code to the *Item class.