Clean up and document Buffer API