clean up core