Finished(?) Grid class and helper methods.