There is some similarity to the code in `static/timepiece/js/dashboard.js`. Is it worthwhile to refactor now into a common base, or should we leave that as an exercise for future developers?