update marker details; minor refactor marker.js