Add comments to and test RACS function