Refactoring all structure of Line2d and tests