Trim unnecessary code.