Some updates for scala code