ACE failed when estimateR ran out of rare species

Also some minor re-arrangement and clean up.