Some corrections in the code.
GS and Cluster need small changes to work as standalone (main part done)
TODO's added to check later