Add support for stats. Clean up some step naming code.
Sync up with latest Janino