Modifications to compile with Scala 2.11