Refactoring and optimized splining