Read this first : Do not Factory Reset your Rooted Phone
Don't worry about the title, AndyOpie150 has a great guide in here for flashing roms and recoveries!
Don't rush into this, you could end up with an expensive paperweight, please read and follow directions carefully!
Read this : ~**~ PLEASE READ ME FIRST! Android Things to Know! ~**~
it will answer 90% of your questions.