Implemented the first version of bounds checking, will now only move an object to a new position if it is within the grid rectangle.