Added datatype conversion functions and related tests.
Documented conversion conventions in README.