Refactor a given monolithic tic-tac-toe game, such that the code: 1) Is modular, consisting of at least two files that logically group related functions. 2) Implements an appropriate Python project folder structure. 3) Includes at least one test case. 4) Employs a 2D data structure.