Added a TEST_MODE variable that gets activated when testing