Cleaned curve factory
Test refactoring/moving around