Implemented changes in plugin infrastructure requested by reviewers. #989 (Implement review comments in plugin infrastructure)