Revert "Updated capability manager"

This reverts commit 01ef657a09e90bb682b1819afa4cb9c838098d8e.

Causes segfaults, re-applying commits one at a time to determine cause.