Cleaned up plugin_functions.lua by splitting into multiple files.