Basic grid manipulation functions.