sync up changes with master

Rebase to master, after changes to the function interfaces were merged
in.