Added documentation, incuding example.