Refinement of input api wrt. to ime and removal of redundancies. Also, explicitly specified string type (utf8 everywhere).
Small api changes.