Added API docs

Added API docs. Fixes #2.

Please check lines Lines #L59-69 before signing off.