Optimize scala code; Add comments about openning project in IntelliJ