Made substantial changes to function definitions to improve cran-compilability.  Also, worked out print methods for coeffs.