Used Cleartimeout and TimeoutId to create an autosave() function