MADS: Fix GCC warnings
MADS: Fix memory leaks in MSurface