fix code formatting
separate conversion code and document
remove null conversion and document