Documentation and samples added, updated tests.