A few things that will help you get the best experience possible. Not all phones are created equal tho.
This is what I did myself on my M8, and what is recommended for most people.
Simply follow the instructions HERE. It will of course take a while to setup your phone again, but it’s so worth it.
Wipe Cache Partition
Simply follow the instructions HERE. This step will not remove any personal content on your phone, it will merely make sure that the environment on your phone is as nice and clean as possible.
Issues with Facebook Messenger
You have no Developer options underSettings? Follow THIS
You’ve got a little more HERE