Improve and refactor adding deps, implement removing and modifying deps