more quality checking; removed obsolete database code