Made mixin configurable.
Added tests and updated documentation.