Broke out the data processing into it's own class so we can store state