Improve separation between repository and service layers