Minor change
Fix repository hierarchy and global handling (this should fix a lot of bugs
but may introduce a major breakout in multi repo configurations)