Doc comments for hal and lib.
Merge pull request #118 from bharrisau/doc2

Doc comments for hal and lib.

Reviewed-by: farcaller