code cleanup, converting unneeded globals to locals
adding multiple language support
using only two character code