Added scripts in Scala language, small fixes to python and js versions