Fixed issues and typos reported by IntelliJ IDEA's code inspections for Scala