Small API and build changes; writing documentation