making mixins; code cleanup