Debugged the error message. Changed '=' to '===' for the expressions.
Added comments to each line, defining what it does.