iCloud photo library causing duplicate photos Ever since I started using iCloud photo library I am getting duplicates in photo on iMac OS X El Capitan. Also, all photos that went into the iCloud photo library  uploaded on iPhone too.

What am I doing wrong? I don't want all photos on iPhone and certainly don't need duplicates in photo.
iCloud doesn't duplicate the photos, it just stores them in iCloud.

The purpose of iCloud Photo Library is to allow you to access your photos on all your devices. If you don't want your photos on your iPhone, don't use iCloud Photo Library.