Restore layers code