A cleanup of the drinkpi code