Functionality for taking photo and have delete and preview feature