Multiple changes

- Moved program functions to the library.
- Moved the implementations of the enum value name/range functions into
  the implement directory.