Simplifying code snippets