Species dropdown code moved into smaller methods

This is to make it easy to modify this code in plugins