Refactoring in sphere source code