Make sliding_window output more readable + Fix coding style issues in examples

@mortenvp I cleaned up some examples here. I also made the sliding_window output human-readable. We really need a tool to enforce our coding style. The style in these examples was not very consistent.
You can merge when you feel like ;)