Code style changes, cleaning, and documentation for geom.h and geom.cpp