Minor optimization regarding global obj

* use "lgs" as global object for lgs stuff.
* initializing data with null is unnecessary