Remove unused dependencies and add sources