Dead code removal, export cleanup