Testing Added

Added QUnit test cases.
Fixed bug that allowed spaces in table names.
Tightened up type checking in methods.