Refactor engine java-packages and split RepositoryService to new services