[Core] code cleanup