partial big refactory of dependencies