Updates for Scala 2.10 builds.

Case class inheritance was deprecated in 2.8 and removed in 2.10, so I moved some code into abstract classes.