Restructured Plugin.cs