Fixed up the code snippets