Moved conv functions to separate file.