Api cleaning up.

If you have any api changes/fixes to suggest, now is the time.

I will merge this when it's done and people agree.