Update .gitignore
Add documentation comments to lib.h