Added parallel SG. Fixed some formatting from last commit.