Made changes to API and internals to improve the state of things.