Updated database script and added teardown script