Optimized recursive repository decomposition algorithm. Left debug logs in - otherwise it'll be hard to know when the process is finished vs if its hanging.