clean up examples (white space, some more idiomatic scala)