Refactor ability_spec and add additional tests