reformatting
Unit test Surface and fix errors

1) Made the read index operator const
2) Fixed the indexing for the read and write index operators
3) Added serialization for debugging
4) Unit test the read and write index operators