cleanup core