Final changes to clearInput fucntion