Creating and cleaning up structure.