Grid model implementation

Merging in changes from working on grid model and number pad and unit testing.