Improve Enum based on code taken from ruby-enum. Much better.