Refactor scala.el