update api interface.
remove account model.
refactor api private methods.

[fixes issue #22]