Complete the history updater

Need more error handling & test case