Refactored some Grid stuff