numerous bug fixes, enforced type restrictions on coefficients, more documentation