improve documentation for enums package + some minor refactoring