Initial work on moving states to MySQL and adding functions to run tests
State seems to be working. Tests pass