[powerdebug 06/17] Factor out display code