Code Samples

Updated the code samples and explanations