Refactor (make functions)
Make legend and size configurable for pie.