Fixed the delete function on the preview page.
Begin refactoring of code for better readability.
Refactoring was successful\! Sweet\!