improvements to scala mode