Remove unnecessary functions and optimize large-object handler's codes