Some pretty hardcore refactoring. Broke quick test results handling, will fix tomorrow
Update TB statistics done
Update results done
Merge remote-tracking branch 'origin/refactored'