Worked on the beam splitter. Works except the nargin isn't working as expected. (If i force the case true, it works. If i force it false, it doesn't go along that conditional and no out of bounds problems. Still need t figure this nargin thing.