Modularize plotting and computing