Added uniqueness test to product model.

Still need to add commenting and formatting.