Deformations of objects and categories