Refactor everything except reporting