refactoring, fixed cyclic deps