Add admin tabs (not implemented in UI yet) and remove duplicate code