Added plugin validations and general refactors.

These commits sync development and master up to date.