cleanup,ref, beginning settings