Refactor to use "simpler" data objects

 * all database operations require passing a cs_phpDB object as 1st arg