Made the stat system and database system modular.