Is there an official / safe way to clear a computer?

I have a windows 8 touch screen from hp that I got from Sam's Club. I mostly use it for gaming but I also use it for video editing and game design ( unity3d, blender ) but as of about 3 months ago it started running slow and popups ( that are obviously viruses ) come up everywhere. Is there an official way to clear a laptop to where it's like you just got it.

P.S. I got most of my games off Steam but I do have Minecraft. My video editing softwares are on discs so they're fine.

Download and run a free anti-virus program such as Malwarebytes, Superantispyware or Avast.

Go to control panel and uninstall all of the programs that have accidentally downloaded including toolbars. This is essential to speeding up the PC. If you do not absolutely need and or use a program, uninstall it. Each uninstalled program will free up your PC.
.
Go to Start, type the term msconfig in the search box. Find msconfig.exe in the search list and click on it. Now, find startup over on the top right.
Click it to bring up the list of programs that get loaded during startup.
Look at the names of the programs and the date that they were added to startup. To clean up your PC you should unclick all-yes all- of the ones that you did not load or do not want to start and take up memory and load time during startup. This does not prevent a program from running from the desktop so have not fear. Much of what you will see is malware so write the names of them down because you are going to look again in programs to find and and delete them. Uncheck the boxes and make a list.
Exit and reboot - accept the config change notification on reboot.
Now go to program management and go down that list uninstalling all of the
junkware that you find still there by using the list. Be patient but be aggressive. Those strange toolbars and enhancers and reg cleaners, etc. Have got to go.
Reboot
Now when you boot you will have a very short program load time.

One note- Following any update a PC will restart slowly the first time and sometimes a second time in order to fully install the update.
You do need updates, so schedule them or manually run them. They never cause a permanently large increase in startup time. However, a one time 10 minute startup may occur following large updates.

The above will speed up your PC and the process should be done periodically.

Reboot and download a free registry cleaner such as EUSING or run your own.

Delete all temporary files by using browser tools, internet options and then check the delete all files on exitbox but do not change any of the page 2 check boxes.
Exit

Fasten your seat belt and launch your browser again.
Save this post for later reference as you will need to do this occasionally.

Your pc now has all of your pictures and documents and downloads and all of the updates for
the operating system and all of the drivers and updated software but it does not have…

ALL OF THE GRIEF CAUSED BY RELOADING WINDOWS AND TRYING TO START OVER.

You could always just put a new hard drive or even better, SSD in. That's not hard at all.

Use Malwarebytes (free) to scan for malware and virusses

And then use the windows disk cleanup tool for cleaning up your hard drive.
Windows 8
1. Settings
2. Control panel
3. System and Security
4. Administrative Tools
5. Run Disk Cleanup.

Hope these things solves your problem.

http://www.pcadvisor.co.uk/how-to/windows/3443121/how-reinstall-windows-8/

"clear a laptop to where it's like you just got it."

Yes. The vast majority of Windows 8 systems include a factory restore or system recovery feature. This generally allows two options. One, replace all system files with the originals the system shipped with. Two, erase the Windows drive, then restore the original Windows installation, programs, and all other files the system shipped with.

The second option is the one you want, I think, as it returns the computer to factory-fresh condition.

Factory restore may be invoked by keeping a particular key pressed while powering up, or by enabling the advanced options menu to appears at the next restart. Check the computer documentation or the manufacturer's support site for details.