all the popups now have the same method for closing. tidied up file.