Cleaning up code for species_codes()
Updated assertions on the plot function