Updated js summarize to fix prototype problem