Add singleton sample and updated documentation.