Improve converters and add unittests