Eliminated all global variables