Move converter out of util, fixes #29