Remove unused arguments from function