Preparation for cluster support

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