Basic safe refactoring