finish up documentation, improve GlobalContext.initialize