Improve DB queries, make timeline graph more bar-graph-like