Refactoring to a single ImageMarker class