Added rudimentary statistics tracking