Revert some Makefile changes

 * Fix template copy issue
 * Fix `dist` target
Update plot handling in web UI

 * Add missing JSON tags
 * Add plot marshalling function