Rewrote the gem so that it actually works...