turned the script into a class

This branch starts refactoring convert.rb into a more maintainable class.