Refactored some code to support integration tests. Added integration test for update and dbScripts tasks.