Moved GSCA functions to a separate file