Refactoring and tagging