reverted to cleaned-up code. fixed text in value history plot showing dates. adjusted last date plotted for clarity on plot.