Extracting Conversion functions

Moving to separate files to better contain purposes