Refactoring for dynamic API methods. All specs pass except Invite.