Midpoint refactoring