Revised js for maps and results