Added comparison functions

Added logical comparison functions - less than, greater than, equality.