Almost complete -still some duplication issues with logging records.