Dead code and declaration removal