Add selftest. Fix min_age feature.