Refactoring and combined output...

Fixed color key…
Output all records into another file…
The log now has a cdv extension.