Source refactor