Cleaned up API between cli and validation
Extracted code for merging record ids into a separate class in repositext/merge/...