Converted addmarker as callback and fixed issues when deleting markers