Move localrepo to src/lib