simplified the plugin. removed functions which removed WordPress native features.