Implement Extremals() and tests