Initial revision of MandSQL