Major Update 2

Separated the classes to different files so that is easier to go through
the them.
Added extensions for stats and for diagnostics.