Refactored the use of abilities.