refactor source files