Added nogil to pure c functions.
Optimisation notes added to CSG, for future reference.