Refactored code snippets so that examples exist within their own directory.