First commit of the sws data manipulation functions