Moved creation of pie back into controller