Scala fixings

Fix a lot of smaller things.