Duplicate and setting size implemented
Implemented locking
Added more parameters in duplication function, added support for extensions