Removed unused variables
Fixed check of same expressions on both sides
Removed unused variable