Scala Inoperability & code improvements