Reworked glboal to be a shared object.
Templating and framework implemented.