Improved doco and added a sample