Update geometry library and add tests