Cleanup unused code

Making the example a bit clearer by removing redundant code-parts and not used code.