Created a backend file, as opposed to echo redirecting to write files
Added compare_files function to diff and overwrite with user input
moved apache restart to end of file