More API tweaks

Still need to figure out what causes the hanging in the test.
Finalizing implementation
Merge branch 'master'