Refactoring and optimization of performance delegate and unDelegate methods