Reduce number of nested levels

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>