remove some unused function arguments and unnecessary libPath