Fix unit tests, update record preview