Refactor the example a bit