(hopefully) Atmos piping for Sand base

I have no idea what's going on in the code at the bottom, but I assume
that's some sort of error or something. Anyway, this is the merge for
atmos piping for the sand base.