Few more functions, new template, and JS

Added functions for logging/quantifying directives, as well as building
an element to output this information. Rigged up a MutationObserver to
listen for new lists when PHP flushes, which then updates a meter
element indicating progress.