Added some logic for handling a given item type

And the start of some query commands. Also a missing solution file
change from the previous commit.