In Main.scala, made nearly all private and final