Main classes fixes due to Scala 2.9 problems