Wrapped the converter into a class

Wrapped the converter into a class so that global variables (ugh!) can
be replaced with `self` variables