More test hooks and the like