glacier: major cleanup

Change-Id: I8a546cc59d09e783320ecfd93a610e2f3f9c71ea