Polylines Removing Tests, ONE possible solution

This is one of the possible solutions to the removing polylines, implemented