Updated database branching functions to support test database(s)