Refactor complete for new data format