Recording refactoring and some interface improvements