Cleanup old code and added function to remove old deps
Fixed cache path argument in constructor
Cleanup main and fixed some code