working on chart data and more database cleanup