small refactoring of cfg
general refactoring creating proper subpackages