added event for contractor initialization and api attach/detach. Added API method for pasting duplicated contractor