Updated to work with Statamic 1.6.7

Made some adjustments to this plugin to get it working with the latest version of Statamic.