Adding newacc and newms commands and changing the way derivation indices are managed in the database