Add documentation to functions
Summary
We should use Xcode markup to document functions, especially the utility functions, so that the code is easier to understand, maintain, and extend.
Functions and variables should also all follow the Swift API Design Guidelines.