Separate api functions from core upstream, update docs