Started to rewrite the symbolic part in Scala