Move game_meta functions out of game.php, update tests