Changed Equals to use ReferenceEquals in the primitive types
Added Error exceptions