fixed db cleanup script, fixed typo in schema