Functional Refactoring in scala presentation update