Added some console output and time measurements.