Rewrote plugin entirely