Support for surgery tables API

Tests pass.  Merging.