rewrote conversion to and from strings. Added testsuite. Improved documentation