Move assertions to separate storage records, improve error handling.