start cleaning up geom.jl, plus a few bugfixes