Fix hashset order issue
Abstract out Path