Remove debug code on discover javascript