Refactored code ! much cleaner. Needs more tests on the MultiLineString
though