Marker handling refactoring.