Fluff: Renamed state methods to for clarity. Updated all callers.
Extended state module with code to dump the SQL statements it receives to a file for analysis.
Extended the 'use' declarations of several passes.