Update example to functional code, changed indents

I'm guessing the marker code is less used, as there's quite some inconsistency in the code / examples. Making this example functional.