Code cleanup and some fixes

Some cleanup and tests needed in order to be able to work on bnc#907907 with confidence.

Sorry for not separating in commits the zombie killing from the spliting into smaller methods, but the latter is very simple (just moving the code a little bit).

https://bugzilla.suse.com/show_bug.cgi?id=907907
you can use `next if @Settings[setting] == @Settings_bak[setting]`