Cleaned up convert.rb, added more funcs.