Improving promise sample and adding required libraries
Various updates from review process