Refactoring core of Spring