Continued work integrating the SQL db to replace ap.params