Refactored code

* Updated sequential_catalog to maintain it's own sequence rather than
  relying on a global sequence.
Added resetSequence API to reset the catalog sequence