Finish API doc and minor tweaks.