Removed old code, simplified convert() method.