cleaned up SetTable and added tests
Merge pull request #59 from timbokopter/feature/cleanup_SetTable

cleaned up SetTable and added tests