Refactoring for SQL related steps and tests.