Made it into a gem
Added comments and marked convert_line as private