Rewrote plugin code to use object-oriented schema