Disregarding older implementation.
Moved method to different file.
Added de-duplication capability.