Added statistics struct.
Merged statsobject into master.