Equals and refactored some nonsense