Fixed the geometry class though we could do with a better way to index
Moved to proper namespace and fixed the tests too