+1 on using traits and case classes (Scala's concept for algebraic data types) instead of enumeration, which also fits nicely with the rest in `Library.scala`.