Compare categories

this adds the compare categories functionality that Rob, Antonio and I discussed in the last few weeks. Look at the final commit message for instructions on how to use. Obviously this will need to get cleaned up for the interface.