Added enum. Added some comments.