Added enums for easier understanding of the code.