Lots of plugin stuff.

Change-Id: I4edbcd580f3bd5ed24da75f705aa5800540f2aca