Adding permissions for administrator role
Dependency and unused function cleanup