Fixed a few bugs in the test code, cleaned up a little logic in the mode...

...l and updated the game controller with the proper database requests.