Added in equality members and fixed some minor code bugs.