Merged in the delegates() wrapper from erikbern's codebase