Fully separates processing, plotting and main