My two cents: your Nexus gives you problems because of malware. Or far too much apps running at the same time and crowding its memory.
What I would advise you: use Nexus Root Toolkit and flash the latest stock firmware for your Nexus. OEM lock it afterwards, if you unlocked it.
You will lose...