Added database layer.
Added the game logic.