Revise add_source method to avoid a potential indefinite loop issue.
yet another fix to IP duplicate detection on import. Slight code restructure in standards files.