Code Refactoring and Feature Detection