moving grid core functionality into mixins