hero scaffolding, continuing to figure out how this behemoth of javascript code works