Refactor XO::Grid, refactor its tests and start documenting the code