change date to be unix timestamp
no more root route... that was lame, clean up, comment a bit, and generalize (don't assume functions are level 1 of tree)