refactoring & remove obsolete