Change way of configuring repo, add tests