Working Uniques code. also refactored code and placed most of it in com.automattic.ngs