Restructure of canvas JS for zonestats and dc_stats