Refactoring to separate out line join/cap logic to LineStyles instead of inner functions