Fixed potential stack issue, removed custom UniqueT and Unique