added replace and constant enum functions

Implemented a constant copy enumerator. Added a function for replacing
enumerators.