Remove unused and duplicate function declarations