cleanup, new sql + database design