Replace duplicated data specs code with mixins.
Whitespace cleanup.
Fix method resolution order.
Fix MRO, import error.
PEP8, unused imports.
Merge pull request #475 from dwf/cost_janitor

Replace duplicated data specs code with mixins.