mimetypes now come from the database rather than hardcoded dict
Beginning migration of database access into commonqueries. To finish tomorrow (out of time. getting late tonight.)