more than that , lucivar had been both teacher and leash for gray , calmly meeting gray 's flashes of temper while demanding that gray remain within the boundaries of protocol when dealing with her or with her court .