Added more comments to the main class for testing and sample.