Refactored the Marker implementation