Added ascii conversion, cleaned up some other code