Tidied code to follow the Google R style guide, broke up the remove.missing.species.tree function into smaller pieces, condensed the disparity functions