Updating code samples so they are easier to run