refactor to use mixin

As I mentioned after the workshop. I refactored the example to use mixin to pull in common methods, so the example code is simpler to allow students to focus on the business logic.