[Issue #74][Finished] removed some redundant lines and conditions