moved more code to light tool plugin