Updated example to use library
Added documentation.