Fixed the sas problems. Now writing binary into text files. Added gaussian noise. Moving on to eliminating invalid states.