Fixed several issues with the integratino tests.

This also involved rebuilding the testing database.