Changed implementation of min/max.

Removed gears::string::stringbuilder from tests.