Huge Refactoring.
Statistics nearly completed.