Removed Visible Dead Codes and Added Condition Checking

Changed Dead code Condition checking on MacTable and ONPortTable