Commented js file.
Replaced repetitive code with mixins.