Refactor SQL scripts and model for SQL/ODBC source.