Viper is easy: if there is a new version released, download that and use TWRP to install.
If TWRP is working I can think of no real reason to update that. You would do so by downloading a newer image then using fastboot to install it (same as installing it originally). Obviously only install a version built for the M8 - a recovery built for a different device would cause serious problems.
As for firmware, the question is whether you are S-On or S-Off? S-Off there will be download threads with instructions at XDA, but make sure you understand exactly what you are doing before trying this, as this is flashing critical parts of the phone. If you are S-On then completely reflashing the phone with an RUU (which will wipe the phone and replace ROM and recovery too) is the only way. I don't know M8 builds in detail so don't know how up to date your current firmware is.
It would be better to ask this type of thing in our M8 root forum. I'll move the thread over there.