Started translating the processing logic for stats

Currently only the structure and counters rates are supported
Wrote basic main function to get an idea of how well it all fits together