Updated  two logic errors

- logic error 1- always creating tables
- logic error 2- using a random number for game instance id
Merge remote-tracking branch 'origin/DBLogic'