We refactored the code.

We added mixins to help seperate out the logic.