Mixins

I moved all the extraneous repeated js functionality into mixins for better organization. The inheritance wasn't making much sense so hopefully this works out much better.