Added agent updater function and wrap around rendering