Working downstream GCM. Base code for upstream setup. Reformatting