Preparation for cluster support

 - Added a bunch of unit test for configuration handling code
 - Finalize all the things
 - Use generified commands

Not always I promote such a constructions