admin and entities refactored