minor cleanup
optimize scalatype for performance