Added some config options and fixed preprocessing

These commits helped with my usage of the plugin and generally increase the flexibility of the plugin. Let me know what you think!