Separated api functions.
Merge branch 'master' into tadayuki