Fixed prime gen
Added removeDupAndSort funciton