Changed grid mode references to use constants