Scala 2.11

Support Scala 2.11 and fix some deprecation warnings.