Proposed curry-based refactor

This is an example pull request