Use constants for table names, and remove meta function template.

Fixes #566.