More table storage stuff

And some bug fixes.