Make things more generic.
Pattern matching can be used with flatMap.
Use placeholder when possible.
Rename files pxx.scala -> Pxx.scala.