Add restore functions

Now you can restore the original window functions