Wrap URI string manipulation in inlined functions.  As well as avoiding mental arithmetic, this would make it easier to switch from "table:" to "file:" for performance testing.