Strip extra character from Scala classes