Refactors ability.rb for readability

This doesn't change the functionality of the class.