Refactor: move functions accessing species CODES to species.py