Added configurable max result and collection set. Refactored DOMS client