Scala part re-structured