MADS: Initial implementation of MSurface class and dependant classes