this stuff is probably the only Fireplace-specific code in the debug JS IMO.