Fixed reference bugs, added inequality operator