Refactoring to make methods configurable with methods instead of params. PRS2 formatted