Master Controller Update

May still have bugs, also missing function for obtaining Rl.