Update code according scala code style