Improved the refresh function

Now it goes through and loads all the objects in order.