Simplify Code inline with Scala Version