Refactor + simplification of the generated svg