added some functions to the grid class and prepended private members with a _
added even more method prototypes and some documentation