Several fixes in repository structures