Add TestLimit

Cleanup tests
Fix limit bug found in "sql" driver