Removed useless hashCode method, cleaned up compareTo.