Refactoring source code