Pie Code Cleanup