Updating fork to handle automatic setting of history_user field, merging changes from Marty Alchin's suggestions