extremum unit tests and fixes