Updated code snippets in paper text