Refactor record system