[Magic-SD] Code cleanup