Standardise file names and remove unnecessary $db_oc and $db
Bring code into line with coding style guidelines