Added a generation counter
Updated the program for Julia 0.3.0