If your phone is working slowly you may want to reset it to factory settings. You can do that by going to settings -> about -> Reset my phone. If you want to install the OS again, then you need WDRT (Windows Device Recovery Tool), plug your phone to your PC, launch WDRT and select your phone. Then you should wait for WDRT to download required files and start the process.
I would recommend you to try resetting the phone to factory settings first.