Fixing cmake flags and options
Fixing statistics gathering
Removing debug printing that was left inside by accident