Added better globals support