minor changes; move imports to where theyre needed