Added documentation, and updated the example