Some tweaks, mostly for Scala