[Core] Do some cleanup