Implemented most of grid class, modified level1 and main