refactored internal APIs for improved encapsulation

this should allow for nicer checking of authZ and user preferences
ensured Unicode support