Updated to Scala 2.10.
Removed parameters.
Using Java's AtomicInteger.
Case class inheritance is prohibited, using an object.
Again case class inheritance, simple fix here.