Added more documentation, examples and demo code.