unit-tests + simplification