Updated Catergories and fixed Compare algorithm.