Some pi cleanup