Added API documentation.  Fixed all the warnings.