Src cleaning and refactoring