Cleanup and simplify code

Generating “modules.dep” is relatively fast
Include dependency logging in verbose mode