Minor tidy-up of scala backend