Moved collection inside connection class, made it private and ensured that ensure_index is called before returning it