Writing proper constructor for Grid class, making printMatrix a member function and making some cleanup