started rewrite to accommodate different data types; cleanups; docs.