Fix term_spec tests
Add Coefficient class implementation and tests