pruned more from tutorial.
now using moment for dates (in js, daysfromnow)