More testing and added documentation

I added tests for grid and reduced grid. I also fixed a lot of bugs in the reduced grid class. Lastly, I added documentation and a custom make target "make doc" that builds all the documentation.