adds special handling for Markers vs Lines 

- also simplified the code a bit