Update format_source function to match all possible source types