minor plugin code cleanup