Controlled defect creation and removal in graphene and MoS2 monolayers.