Merge of kctl, rework of build scripts