Updated documentation examples to have proper indentation.

Added missing return declarations.