Removed Redundant If and If-Else statements