Adds a constructor and compareTo