Rewrote almost the entire plugin completely