Fixed to use the Enums where appropriate