Grid

Fixed some grid functions and output