updated: compareTo, clean up references to nil