refactor grant ref variables

effort to make grant ref sizes configurable at runtime.