add charpmode, orgmode export setting, clean code