Fix small issues and Refactor pairService and Update pairServiceTest