Add pie charts and restruture code