enhanced custom hotplug script
code cleanup in controller file