Revert "Remove limits on the maximum number of species, reactions, and shells"

This reverts commit 6e4aee213c89bd8d2611c6d42268a106e2905f4d.
Revert "Code cleanup"

This reverts commit 766b21cd932feba9149306dbc59d2123fa3682db.