Finish documentation and fix obsolete functions.

Signed-off-by: Robert Xu <robxu9@gmail.com>