refactored entity type controller
Merge pull request #3 from oleg-kravets/master

refactore controller