Add scala code to mainline

This closes #118