Added upgrade command and fixed some admin plugin stuff.