Add auto refresh to layout