UI record box refactoring