More adjustments regarding the use of repository and improved test coverage