Added more character code conversions and cleaned things up a little.