Delete unused params, advanced optimization