refactored SQL deployment, added class for tests