Dead code removal
Various updates