Move SQL string to meta
fixed bug starting TMS
Catches uncaught PRAMGAs
Merge pull request #53 from alexanderson/master

Moved SQL string to metadata