minor changes
added Write_S_Matrix class
remodelling & bugfixes
minor changes