Reformat some of the code for an easier maintenance + add the copy_number information when available