clean up js responses