Overhauled the way the gem works to make it leaner