Added -optimise to scalac arguments.
Migrated from Vector.foreach to Array.iterator for performance reasons.