Reduce number of nested levels.

Here I try to reduce number of nested levels.
Does anyone know how to test this please ? (At least, I wait for travis unit tests.)
Thanks.