Refactored the long conversion methods into a DRYer format