Added equals() and ensureCapacity()

Also cleaned up the comments