Improved repo handling