Update: Move more plotting to function