Refactored leaflet component and eliminated L variable conflicts