Work towards modulizing the MatLab program