Recursive api obj

Only the last commit is new to this PR.