Address review comments

Reinstate some tests, fix comments, improve error message