Updated Main

Changed the main function to allow you to run the macro multiple times
without closing the document