Code from Play for Scala (Manning book)