added periodic refresh and expanded margins
added periodic refresh and expanded margins