remove unused function and gadget