clear up source, prepare to refactor