Added reset layout function