Converted Femtocraft main to .scala