Added a dep replacement method
Inserted the dependency copy/replacement process in the rest of the add function
Added commentary. What has been done breaks the programm.