Refactor helper functions

Moved helper functions for partner onto the partner model.