reduced the number of global objects significantly