Moving geometry and mesh to global scope