Refactored enum binding.