Just an attempt as improving the merge tool to include polylines instead of just polygon