Added control with delay

Matlab folder for simple code
small bug fixes across the board