Removed old commented out pivot flatten function.