Ok, Updated a lot. It doesn't add the entry in the history if it already exists, and ADDED a button to clear the history.