Use 1 and 2 instead of min and max
First pass at render functions
Fix class computation
Add geometry_rotate
Document and export render functions.
Including quite a few bug fixes