Changed the way restore works to allow for improvements