To flash your phone correctly, go to the XS++ section. There's a guide posted there that quite thorough.

For firmware, you need to first check your CID with xs++. once you've done that you'll get a CID number and according to that number, you'll need to find the correct firmware for it.

ex. if it's CID RED then you go the dl section and a firmware with RED_51 at the end. Match it with the same FS file.

lastly, you'll need a cuspack, which you can also find here. Choose the one that's your region and download it.