Changed enum to type for better generic support and extensibility