Helpers refactor, ongoing refactor for #3282

Not ready to be merged yet, just using this to track progress.

If you feel the need to discuss this, please use ticket #3282 for that (please keep this pull request clean).