Remove unnecessary definitions and calls