Fixed display of section results

Also improved code a little bit

Change-Id: I97058b1823213bc233a68e755ac872acb8eacc24