Moved mesh code to geometry.