Changed layout of globals to save some memory