Refactoring mixin functions to helper classes