Removed redundancies with recordHistory function.