copy cleanup method when creating new layout