Some final commits related to record before refactoring