Changed global to objects