Refractor and add enumerize plugin