generalization, cleanup, and init