Adding support for using CPSS in a loop. This will require some additional clean up.