Refactored the views with a mixin.