Refactor - support custom Repository creation