Refactored and renamed.