Implement basic api for stats.
Rewrite percolation class.
Fix bugs after first submission.
Final clean up.