Many improvements on the global code.

Add a simple Cython example.