refactor templating; use string dates instead of UNIX timestamps