Kuranishi theory via homotopy algebras