refactoring, move stuff from init to config and package